<template>
  <div class="page">
    <div class="login">
      <div class="top-content">
        <div class="logo-content"></div>
      </div>

      <div class="login-form">
        <div class="my-input">
          <van-icon name="manager-o" size="20" color="#bfbfbf" />
          <van-field v-model="username" label="" placeholder="请输入用户名" />
        </div>
        <div class="my-input">
          <img class="my-input-icon" src="../assets/img/password.png" />
          <van-field
            v-model="password"
            label=""
            type="password"
            placeholder="请输入密码"
          />
        </div>
        <div class="forget-password">
          忘记密码？
        </div>
        <div class="login-btn">
          <van-button round block type="info" native-type="submit" @click="login">
            立即登录
          </van-button>
        </div>
        <div class="no-acount">
          还没有账号？
          <span>马上注册</span>
        </div>
      </div>

      <div class="bottom-content">
        <div class="third-login-text">第三方登录</div>
        <div class="third-login-image">
          <img class="third-login-img" src="../assets/img/qq.png" />
          <img class="third-login-img" src="../assets/img/weibo.png" />
          <img class="third-login-img" src="../assets/img/wechat.png" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "",
      password: ""
    };
  },
  mounted() {
    this.$store.commit("hideTabBar");
  },
  methods:{
      login(){
          this.$router.push("/");
      }
  }
};
</script>

<style lang="less" scoped>
.login {
  height: 100vh;
  background: url("../assets/img/login-bg.png");
  background-size: 100% 100%;
  .login-form {
    padding-top: 40vh;
    width: 80%;
    margin: 0 auto;
    .my-input {
      display: flex;
      justify-content: space-around;
      align-items: center;
      border-bottom: 1px solid #ebedf0;
      padding-top: 10px;
      .my-input-icon {
        width: 20px;
        height: 20px;
      }
    }
    .forget-password {
      text-align: right;
      font-size: 13px;
      padding-top: 10px;
      color: gray;
    }
    .login-btn {
      padding-top: 20px;
      .van-button--info {
        background-image: linear-gradient(to right, #484cff, #4391ff);
      }
    }
    .no-acount {
      text-align: center;
      padding-top: 10px;
      font-size: 13px;
      color: gray;
      span {
        color: #1989fa;
      }
    }
  }
  .bottom-content {
    position: fixed;
    width: 100%;
    top: 85vh;
    .third-login-text {
      text-align: center;
      font-size: 13px;
      color: gray;
    }
    .third-login-image {
      display: flex;
      justify-content: space-around;
      align-items: center;
      padding-top: 30px;
      width: 80%;
      margin: 0 auto;
      .third-login-img {
        width: 30px;
        height: 30px;
      }
    }
  }
}
</style>
